<h1>
    Login
</h1>

<div class="form-group">
    <label for="login-input-email">
        Email
    </label>
    <?php
        FT::email("email",null,array(
            "class"         => "form-control",
            "id"            => "login-input-email",
            "maxlength"     => 255,
            "placeholder"   => "Email"
        ));
    ?>
</div>

<div class="form-group">
    <label for="login-input-password">
        Password
    </label>
    <?php
        FT::password("password",null,array(
            "class"         => "form-control",
            "id"            => "login-input-password",
            "maxlength"     => 255,
            "placeholder"   => "Password"
        ));
    ?>
</div>

<?php
    FT::button("Login",array(
        "class"             => "button-submitform btn btn-default",
        "data-classname"    => "Login",
        "data-functionname" => "doLogin"
    ));
?>

<script type="text/javascript">
    $("#login-input-email").focus();
    
    __APICALL_FUNC["Login/doLogin"] = function(result) {        
        if (result.code == 0) {
            getView();
        } else {
            setError.call(this,result);
        }
    }
</script>